package org.example.mybatis.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.mybatis.model.ArticleInfo;

@Mapper
public interface ArticleInfoMapper {
    @Select("SELECT ta.* , tb.username , tb.age , tb.phone " +
            "from articleinfo as ta " +
            "left JOIN userinfo as tb on " +
            "ta.uid=tb.id " +
            "where ta.id= #{id} ")
    ArticleInfo queryArticleInfo(@Param("id")Integer id);
}
